<template>
    <div class="index">
        <h1>我是Index页面</h1>
        <ul>
            <li><router-link to="/index/home">home</router-link></li>
            <li><router-link to="/index/about">about</router-link></li>
            <li><router-link to="/index/userList">userList</router-link></li>
        </ul>
        <div id="viewsDisplay">
            <router-view></router-view>
        </div>
    </div>
</template>

<script>
    import * as url from '../api'
    export default {
        name: "index",
        created(){
            this.$axios({
                url:url.GETDATA,
                method:'post'
            }).then(res=>{
                console.log(res)
                console.log(this.$store.state.user)
            })
        },
        methods:{

        }
    }
</script>

<style scoped>
#viewsDisplay{
    border: 1px solid rebeccapurple;
    height: 100px;
}
</style>